package com.xfapp.demos.controller;


import com.xfapp.demos.common.Result;
import com.xfapp.demos.entity.Feedback;
import com.xfapp.demos.service.IFeedbackService;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户题目反馈表 前端控制器
 * </p>
 *
 * @author jinYi
 * @since 2025-06-09
 */
@RestController
@RequestMapping("/feedback")
public class FeedbackController {
    @Resource
    private IFeedbackService feedbackService;

    @PostMapping("/save")
    public Result save(@RequestBody Feedback feedback) {
        boolean b = feedbackService.save(feedback);
        if  (b) {
            return Result.success();
        }
        return Result.error("-1", "保存失败");
    }

}
